<template>
  <div ref="chart" style="min-width: 400px;min-height: 300px;width:98%;"></div>
</template>
<script>
  /**
  6.实时统计和显示各教室的用电量，按月或按日统计单教室或全校设备用电量并以柱状图的形式显示数值；
 */

  import {
    TodayMultiValueChart
  } from './CalendarChart';

  export default {
    name: 'TodayEnergyBarChart',
    mixins: [TodayMultiValueChart],
    data() {
      const vm = this
      return {
        chartOption: {
          title: {
            text: vm.$t('chart.TodayEnergy'),
            left: 'center'
          },
          tooltip: {
            show: true
          },
          xAxis: [{
            type: 'category'
          }],
          yAxis: [{
            type: 'value',
            show: true
          }]
        },
        queryParams: {
          groupDept: true,
        },
        valueKeys: ['energy'],
        groupKeys: ['department'],
      }
    },
    methods: {
      // translateItem(item) {
      //   item.energy = item.energy || 0
      //   item.totalCount = this.groupCount[item.deptId]
      //   return item
      // }
    }
  }

</script>
